package com.ruoyi.edu.service.impl;

import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.commons.lang3.StringUtils;
import com.ruoyi.edu.mapper.EduSubjectMapper;
import com.ruoyi.edu.domain.EduSubject;
import com.ruoyi.edu.service.IEduSubjectService;

import java.util.List;
import java.util.Map;

/**
 * 课程科目Service业务层处理
 *
 * @author niruichen
 * @date 2020-12-22
 */
@Service
public class EduSubjectServiceImpl extends ServiceImpl<EduSubjectMapper, EduSubject> implements IEduSubjectService {

    @Override
    public List<EduSubject> queryList(EduSubject eduSubject) {
        LambdaQueryWrapper<EduSubject> lqw = Wrappers.lambdaQuery();
        if (StringUtils.isNotBlank(eduSubject.getTitle())){
            lqw.like(EduSubject::getTitle ,eduSubject.getTitle());
        }
        return this.list(lqw);
    }
}
